﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using ThongTin;
using DuLieu;
using ThaoTac;

namespace GiaoDien
{
    public partial class frmThongTinSinhVien : Form
    {
        public frmThongTinSinhVien()
        {
            InitializeComponent();
           
        }

        private void frmThongTinSinhVien_Load(object sender, EventArgs e)
        {

            if (raGioiTinhNam_SV.Checked == true)
            {
                textBox1.Text = "Nam";
            }
            if (raGioiTinhNu_SV.Checked == true)
            {
                textBox1.Text = "Nữ";
            }
            if (raChinhSachCo_SV.Checked == true)
            {
                textBox2.Text = "Có";
                if (raChinhSachKhong_SV.Checked == true)
                {
                    textBox2.Text = "Không";
                }
            }
        }
        public String MaSinhVien
        { 
            get { return txt_MaSinhVien_SV.Text; } 
        }
        public String TenSinhVien
        {
            get { return txtTenSinhVien_SV.Text; }   
        }
        public DateTime NgaySinh
        {
            get { return dateTimeInput1.Value; }
        }
            public String GioiTinh
        {
            get { return textBox1.Text; }   
        }
            public String Lop
        {
            get { return cboLop.Text; }   
        }
        public String DiaChiThuongThu
        {
            get { return TxtDiaChiThuongTru_SV.Text; }   
        }
        public String NoiO
        {
            get { return txtNoiO_SV.Text; }
        }
        public String ChinhSachUuTien
        {
            get { return textBox2.Text; }
        }
        public event EventHandler addNew;

        private void btnxacnhan_SV_Click(object sender, EventArgs e)
        {
            EventHandler eh = addNew;
            if(eh!=null)
            eh(this,e);
        }

        private void btnThoat_SV_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void load()
        {
            loadcombobox load = new loadcombobox();
            //looad   cbo

            cboLop.DisplayMember = "TenLop";
            cboLop.ValueMember = "MaLop";
            cboLop.DataSource = load.loadcombox("Lop").Tables[0];

            }


    }
}
